const webpack = require('webpack');
const merge = require('webpack-merge');
const htmlWebpackPlugin = require('html-webpack-plugin');
const baseConf = require('./webpack.conf.js');

module.exports = merge(baseConf, {
    devServer: {
        host: '0.0.0.0',
        port: '8080',
        contentBase: "../dist/",
        // contentBase: false,
        overlay: true,
        compress: true,
        hot: true,
        inline: true,
        clientLogLevel: 'warning',
        watchOptions: {
            poll: true,
        }
    },
    plugins: [
        new webpack.DefinePlugin({
            NODE_ENV: '"development"'
        }),
        new htmlWebpackPlugin({
            filename: 'index.html',
            template: 'index.html',
            inject: 'head'
        })
    ]
})
